"use strict";
//多维转一维
function singleFun(arr) {
    let num = -1;
    for (let i = 0; i < arr.length; i++) {
        if (arr.indexOf(arr[i]) == arr.lastIndexOf(arr[i])) {
            num = arr[i];
        }
    }
    return num;
}
console.log(singleFun([1, 2, 1, 2]));
